package com.twotiger.and.adapter;

import java.util.ArrayList;

import android.annotation.SuppressLint;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
import app.twotiger.p2p.R;

import com.twotiger.and.bean.Bank;

public class RechargeHFBankAdapter extends BaseAdapter {
    private LayoutInflater inflater;
    private ArrayList<Bank> list;
    private Context context;

    public RechargeHFBankAdapter(Context context, ArrayList<Bank> mList) {
        super();
        if (context == null) {
            return;
        }
        inflater = LayoutInflater.from(context);
        this.list = mList;
        this.context = context;
    }

    @Override
    public int getCount() {
        return list.size();
    }

    @Override
    public Object getItem(int position) {
        return null;
    }

    @Override
    public long getItemId(int position) {
        return 0;
    }

    @SuppressLint({ "ViewHolder", "InflateParams" })
    @Override
    public View getView(final int position, View convertView, ViewGroup parent) {
        View view = inflater.inflate(R.layout.recharge_hfbank_grid_item, null);
        TextView tv1 = (TextView) view.findViewById(R.id.tv1);
        if (list != null) {
            tv1.setText(list.get(position).getName());
            return view;
        }
        return view;
    }

}
